﻿#region Header

/*
Remote views based on linq
By

Pascal Hauser 
Dipl. Ing. in Informatik, Hochschule für Technik Rapperswil, 2006
Master Thesis, Hochschule für Technik Rapperswil, 2008-2010

and

Raphael Gfeller
Dipl. Ing. in Informatik, Hochschule für Technik Rapperswil, 2006
Master Thesis, Hochschule für Technik Rapperswil, 2008-2010

*/

#endregion

#region Usings

using System.Linq;
using InterLinq.Client;

#endregion

namespace InterLinq.Test.DH {
	/// <summary>
	/// Description of the class
	/// </summary>
	public class SampleDataContext : ClientContext {
		#region Public Properties

		/// <summary>
		/// Get all available orders
		/// </summary>
		public IQueryable<IOrder> Orders {
			get { return QueryHandler.GetTable<IOrder>(); }
		}

		/// <summary>
		/// Get all available orders
		/// </summary>
		public IQueryable<IProduct> Products {
			get { return QueryHandler.GetTable<IProduct>(); }
		}

		#endregion

		#region Public Methods

		/// <summary>
		/// Ctr
		/// </summary>
		/// <param name="queryHandler"></param>
		public SampleDataContext(IQueryHandler queryHandler) {
			QueryHandler = queryHandler;
		}

		#endregion
	}
}